//package com.wkbb.sports.websocket;
//
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.web.socket.CloseStatus;
//import org.springframework.web.socket.TextMessage;
//import org.springframework.web.socket.WebSocketSession;
//import org.springframework.web.socket.handler.AbstractWebSocketHandler;
//
///**
// * Created by XiuYin.Cui on 2018/5/1.
// */
//@Slf4j
//public class MarcoHandler extends AbstractWebSocketHandler {
//
//    @Override
//    public void afterConnectionEstablished(WebSocketSession session) {
//        log.info("=====MarcoHandler============WebSocket 连接建立......");
//    }
//
//    @Override
//    protected void handleTextMessage(WebSocketSession session, TextMessage message) throws Exception {
//        log.info("=====MarcoHandler============接收到消息：" + message.getPayload());
//        Thread.sleep(2000);
//        //发送文本消息
//        session.sendMessage(new TextMessage("Polo!"));
//    }
//
//    @Override
//    public void afterConnectionClosed(WebSocketSession session, CloseStatus closeStatus){
//        log.info("=====MarcoHandler============WebSocket 连接关闭......");
//    }
//
//}
